import java.util.Scanner;

public class Test {
    public static int fib(int a){
        int  next = 0;
        int first = 0;
        int second = 1;
        for (int j = 1; j < a; j++) {
            next = first + second;
            first = second;
            second = next;
        }
        return next;
    }
    public static void main(String[] args) {
        Scanner sanner = new Scanner(System.in);
        int a = sanner.nextInt();
        int ret = fib(a);
        System.out.println(ret);
    }
    public static void main3(String[] args) {
        Scanner in = new Scanner(System.in);
        String str1 = in.nextLine();
        String str2 = in.nextLine();
        boolean shouldAdd = false;
        StringBuilder stringBuilder = new StringBuilder();
        char[] ch2 = new char[str2.length()];
        for(int j = 0; j <str2.length() ; j++){
            if(str1.length() > 100 || str2.length() > 100){
                break;
            }
            char ch3 = str2.charAt(j);
            ch2[j] = ch3;
        }
        for(int i = 0 ; i < str1.length() ; i++){
            shouldAdd = true;
            if(str1.length() > 100 || str2.length() > 100){
                break;
            }
            char ch1 = str1.charAt(i);
            for(int j = 0; j <str2.length() ; j++){
                if(str1 == " "){
                    shouldAdd = true;
                    break;
                }
                if(ch1 == ch2[j]){
                    shouldAdd = false;
                    break;
                }
            }
            if(shouldAdd == true){
                stringBuilder.append(ch1);
            }
        }
        System.out.print(stringBuilder.toString());
    }
    static int i;
    public static void main2(String[] args) {
        System.out.println(i);
    }
    public static void main1(String[] args) {
        System.out.println(100 % 3);
        System.out.println(100 % 3.0);

    }
}
